package tree;

public class PreTraverse {

    public static void preTraverse(TreeNode root)
    {
        if (root != null) {
            System.out.print(root.getValue() + " ");
            preTraverse(root.getLeft());
            preTraverse(root.getRight());
        }
    }
}
